<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  
<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/Linux_FAQ.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:24:00 GMT -->
<head>
    <title>NTFS Documentation: Linux Driver FAQ</title>
  </head>

  <body> 
      <h1><a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> Documentation: <a href="javascript:if(confirm('http://www.informatik.hu-berlin.de/~loewis/ntfs/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.informatik.hu-berlin.de/~loewis/ntfs/'" tppabs="http://www.informatik.hu-berlin.de/~loewis/ntfs/">Linux Driver</a> FAQ</h1>

      This should help you to help us:)
      <p>

      <h2>How to compile the <a href="javascript:if(confirm('http://www.informatik.hu-berlin.de/~loewis/ntfs/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.informatik.hu-berlin.de/~loewis/ntfs/'" tppabs="http://www.informatik.hu-berlin.de/~loewis/ntfs/">Linux driver</a> as a module?</h2>
      Extract the latest <a href="javascript:if(confirm('http://www.informatik.hu-berlin.de/~loewis/ntfs/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.informatik.hu-berlin.de/~loewis/ntfs/'" tppabs="http://www.informatik.hu-berlin.de/~loewis/ntfs/">driver</a> sources with <pre>tar -xvzopf ntfs-yymmdd.tgz</pre>, then enter the right directory with <pre>cd ntfs</pre>. Edit <kbd>linux.mk</kbd> to fit your desires (NTFS_DEVICE and MOUNT_POINT are respectively the default <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> partition and mount point). Then just type <pre>make linux</pre>. Now you should have, among the <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> tools (<kbd><a name="ntdir">ntdir</a></kbd>, <kbd><a name="ntdump">ntdump</a></kbd>, ...), the <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> <a name="module">module</a>. Copy it as root to your <a href="#module">module</a> directory, using something like <pre>cp ntfs.o /lib/modules/2.x.yy/fs</pre> and if you have kerneld, do <pre>depmod -a</pre> in order it to find the <a href="#module">module</a> next time it will be asked to load it.
      <p>

      <h2>How to mount a <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> partition?</h2>
      If you don't use kerneld, load the <a href="#module">NTFS module</a> with <pre>insmod ntfs</pre>. Then, type as usually <pre>mount -t ntfs &lt;your <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> partition&gt; &lt;your mount point&gt;</pre>
      <p>

      <h2>How to enable/disable the debug mode?</h2>
      Verify that you have compiled your <a href="javascript:if(confirm('http://www.informatik.hu-berlin.de/~loewis/ntfs/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.informatik.hu-berlin.de/~loewis/ntfs/'" tppabs="http://www.informatik.hu-berlin.de/~loewis/ntfs/">driver</a> with DEBUG_NTFS=y in <kbd>linux.mk</kbd>. Then just type <pre>echo "3" > /proc/sys/fs/ntfs-debug</pre> to enable the logging of full debug information in your system logs, and <pre>echo "0" > /proc/sys/fs/ntfs-debug</pre> to disable it. Note that if you use the <a href="javascript:if(confirm('http://www.informatik.hu-berlin.de/~loewis/ntfs/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.informatik.hu-berlin.de/~loewis/ntfs/'" tppabs="http://www.informatik.hu-berlin.de/~loewis/ntfs/">driver</a> as a <a href="#module">module</a>, you can also set this value at load-time using the <kbd>ntdebug</kbd> parameter with a value of <kbd>0</kbd> to <kbd>3</kbd>.
      <p>

      <h2>How to get the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> number of a <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>?</h2>
      Say that your <a href="glossary.html#Volume" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Volume">volume</a> is mounted in <kbd>/nt</kbd> and that the full path of the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> is <kbd>/nt/foo/bar/file</kbd>, just type: <pre><a href="#ntdir">ntdir</a> foo/bar --long</pre> and look at the decimal number just at the left of <kbd>file</kbd>. It is always <a href="MFT.html#rootdir" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/MFT.html#rootdir">5</a> for the root <a href="dir.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html">directory</a>.
      <p>

      <h2>How to dump (the <a href="attribute.html#stream" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#stream">stream</a> of the <a href="data.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/data.html">default data file attribute</a> of) a <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>?</h2>
      Say that the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> has the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> decimal number <kbd>x</kbd>. Simply type: <pre><a href="#ntdump">ntdump</a> -i x</pre>, and stop the dump with Control-C.
      <p>

      <h2>How to know my number of <a href="glossary.html#Cluster" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Cluster">cluster</a> per <a href="FILE.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html">FILE record</a>?</h2>
      Just type: <pre><a href="#ntdump">ntdump</a> -i <a href="MFT.html#Boot" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/MFT.html#Boot">7</a></pre>, stops the dump with Control-C, and read the byte at the <a href="Boot.html#f40_field" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/Boot.html#f40_field">offset 40</a>.
      <p>

      <h2>How to dump the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> of a <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>?</h2>
      Say that the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> has the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> number <kbd>x</kbd>, and that your number of <a href="glossary.html#Cluster" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Cluster">cluster</a> per <a href="FILE.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html">FILE record</a> is <kbd>y</kbd>. Compute the decimal product z=x*y, then type: <pre><a href="#ntdump">ntdump</a> -i <a href="MFT.html#MFT" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/MFT.html#MFT">0</a> -c z</pre>, and stop the dump with Control-C.
      <p>

      <h2>How to decode the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> of a <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>?</h2>
      Say that <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> has the <a href="FILE.html#base" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/FILE.html#base">base FILE record</a> decimal number <kbd>x</kbd>. Simply type: <pre><a href="#ntdump">ntdump</a> -i x --mft</pre>
      <p>

      <hr>
      <address><a href="mailto:regis@via.ecp.fr">Regis Duchesne</a> at <a href="javascript:if(confirm('http://www.via.ecp.fr/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.via.ecp.fr/'" tppabs="http://www.via.ecp.fr/">VIA</a>, <a href="javascript:if(confirm('http://www.ecp.fr/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.ecp.fr/'" tppabs="http://www.ecp.fr/">ECP</a>, France</address>
<!-- Created: Wed Feb 12 18:04:43 MET 1997 -->
<!-- hhmts start -->
Last modified: Wed Jan 27 00:02:20 PST 1999
<!-- hhmts end -->
  </body>

<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/Linux_FAQ.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:24:00 GMT -->
</html>
